<?php

namespace App\Models;

/**
 * @mixin IdeHelperChannel
 */
class Channel extends BaseModel
{
    protected $table = 'channel';

    protected $guarded = ['id', 'created_at', 'updated_at'];

    public function parent()
    {
        return $this->belongsTo(Channel::class, 'parent_id');
    }

    public function users()
    {
        return $this->hasMany(FrontendUser::class, 'channel_id');
    }
}
